<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:a="http://richfaces.org/a4j"
	xmlns:a4j="http://richfaces.org/a4j"
	template="/layout/template_box.xhtml">

	<ui:define name="head">
		
			
		
	</ui:define>


<ui:define name="head">

		<script>

	    function mascarar(){
	      
            jQuery(".codigo").unmask().mask('a99');            
                       
        }

		jQuery(function(){
           // mascarar();
		});
    </script>


	</ui:define>

	<ui:define name="MenuInterno">
		<ui:include src="/layout/menu_declaracao.xhtml" />
	</ui:define>

	<ui:define name="body">

		<h2 class="t_curso">
			<h:outputText value="Cadastro de Declaracao" />
		</h2>

		<div id="tamanho_div">

			<a:outputPanel id="pnlForm" ajaxRendered="true">
				<a:form id="formdeclaracaoHome" styleClass="form_confea">
				
				<s:validateAll>

						<ol>

							<li><s:div>
									<p class="tool_alerta">Os campos marcados com * são de
										preenchimento obrigatório.</p>
								</s:div></li>
							<li>
								<fieldset>
									<legend>
										<h:outputText value="Dados da Declaração" />
									</legend>
								</fieldset>
							</li>
													
					<li><s:decorate template="/layout/edit.xhtml" id="decoNome">
						<ui:define name="label">
							Nome
						</ui:define>
						<h:inputText id="nome" required="true" requiredMessage="O campo 'Nome' é obrigatório" styleClass="campo_full" value="#{declaracaoHome.instance.nome}" />													
						
					</s:decorate></li>	
					
					<li class=""><s:decorate template="/layout/edit.xhtml" id="decoPortaria">
						<ui:define name="label">
							Cabeçalho com portaria
						</ui:define>
						<h:selectBooleanCheckbox value="#{declaracaoHome.instance.portaria}" />						
					</s:decorate></li>	
					
					</ol>
					<rich:editor required="true" plugins="table"  language="pt"  width="550" height="400" value="#{declaracaoHome.instance.modelo}" theme="advanced"  >
 							  
                              <f:param name="theme_advanced_toolbar_location" value="top"/>  
                              <f:param name="theme_advanced_toolbar_align" value="left"/>  
                              
                               <f:param name="theme_advanced_buttons1"
 value="bold,italic,underline,|,justifyleft,justifycenter,justifyright,justifyfull,|,fontselect,fontsizeselect,|,preview,|,
 cut,copy,paste,|,source" />
 <f:param name="theme_advanced_buttons2" value="table,|,bullist,numlist,|,outdent,indent,|,forecolor,backcolor,|,
 hr,|,undo,redo" /> 
 <f:param name="theme_advanced_buttons3" value="" />
				     </rich:editor>
				
						<fieldset>
							<h:messages globalOnly="false" styleClass="tool_alerta" />
						</fieldset>

						<a4j:commandLink styleClass="btn" action="#{declaracaoHome.salvar}" value="Salvar" reRender="pnlForm"/>

					</s:validateAll>
				</a:form>
			</a:outputPanel>
		</div>
	</ui:define>

</ui:composition>
